package Demo2;

public class Test {
    public static void main(String[] args) {
        //内部类
        //静态内部类创建对象
//        Car.Tile tile = new Car.Tile("black");


        //实例内部类创建对象
//        Car car = new Car();
//        Car.Tile tile = car.new Tile("black");
//        tile.show();

        //匿名内部类
        //也可以使用到接口上
        Car car = new Car("zzz",1) {
            @Override
            public void show() {
                System.out.println("hhh");
            }
        };

        car.show();
    }
}
